package com.pactera.mavenweb.dao;

import java.util.List;

import com.pactera.mavenweb.dto.Page;

public interface IGenericDao<T> {
	
	void insert(T t);

	void delete(T t);
	
	void delete(String id);
	
	void delete(int id);
	
	void update(T t);

	T queryById(String id);
	
	T queryById(int id);

	List<T> queryAll();
	
	List<T> queryAllByPage(Page page);
	
	public T queryForObject(String hql, Object[] params);

	public T queryForTopObject(String hql, Object[] params);

	public List<T> queryForList(String hql, Object[] params);
	
	public List<T> queryForListByPage(String hql, Object[] params, Page page);

	public List<T> queryForList(final String hql, final Object[] params, final int recordNum);
}
